package com.cinc.mdm.modules.material.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cinc.mdm.modules.material.entity.MdmMaterial;
import com.cinc.mdm.modules.material.entity.MdmMaterialFactoryDetail;
import com.cinc.mdm.modules.material.entity.MdmMaterialFinanceDetail;
import com.cinc.mdm.modules.material.entity.MdmMaterialUnitDetail;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: mdm_material
 * @Author: jeecg-boot
 * @Date:   2021-10-13
 * @Version: V1.0
 */
public interface IMdmMaterialService extends IService<MdmMaterial> {

    /**
     * 添加一对多
     *
     */
    public void saveMain(MdmMaterial mdmMaterial, List<MdmMaterialFactoryDetail> mdmMaterialFactoryDetailList, List<MdmMaterialFinanceDetail> mdmMaterialFinanceDetailList, List<MdmMaterialUnitDetail> mdmMaterialUnitDetailList) ;

    /**
     * 修改一对多
     *
     */
    public void updateMain(MdmMaterial mdmMaterial,List<MdmMaterialFactoryDetail> mdmMaterialFactoryDetailList,List<MdmMaterialFinanceDetail> mdmMaterialFinanceDetailList,List<MdmMaterialUnitDetail> mdmMaterialUnitDetailList);

    /**
     * 删除一对多
     */
    public void delMain (String id);

    /**
     * 批量删除一对多
     */
    public void delBatchMain (Collection<? extends Serializable> idList);

    /**
     * 根据物料编码批量查询
     */
    List<String> findMaterialCodeExists (List<String> materialCodeList);

    boolean checkMaterialUsed(String materialId);

}
